package presentaion.saleui;

import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.JButton;
import javax.swing.JLabel;
import java.awt.Font;
import javax.swing.JScrollPane;
import javax.swing.ScrollPaneConstants;
import javax.swing.JTextField;
import javax.swing.JTable;

public class SalesUI {

	private JFrame frame;
	private JTextField textField;
	private JTextField textField_1;
	private JTextField textField_2;
	private JTextField textField_3;
	private JTextField textField_4;
	private JTextField textField_5;
	private JTextField textField_6;
	private JTable table;
	private JTable table_1;

	/**
	 * Launch the application.
	 */
	public static void main(String[] args) {
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
					SalesUI window = new SalesUI();
					window.frame.setVisible(true);
				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

	/**
	 * Create the application.
	 */
	public SalesUI() {
		initialize();
	}

	/**
	 * Initialize the contents of the frame.
	 */
	private void initialize() {
		frame = new JFrame();
		frame.setBounds(100, 100, 807, 468);
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		frame.getContentPane().setLayout(null);
		
		JPanel panel = new JPanel();
		panel.setLayout(null);
		panel.setBounds(159, 47, 623, 372);
		frame.getContentPane().add(panel);
		
		JLabel label = new JLabel("销售管理");
		label.setFont(new Font("宋体", Font.PLAIN, 33));
		label.setBounds(243, 12, 132, 38);
		panel.add(label);
		
		JLabel label_1 = new JLabel("客户：");
		label_1.setBounds(41, 52, 54, 15);
		panel.add(label_1);
		
		JLabel label_3 = new JLabel("单据编号：");
		label_3.setBounds(452, 52, 60, 15);
		panel.add(label_3);
		
		textField = new JTextField();
		textField.setBounds(522, 49, 66, 21);
		panel.add(textField);
		textField.setColumns(10);
		
		textField_1 = new JTextField();
		textField_1.setBounds(75, 49, 66, 21);
		panel.add(textField_1);
		textField_1.setColumns(10);
		
		JLabel label_4 = new JLabel("业务员：");
		label_4.setBounds(170, 52, 54, 15);
		panel.add(label_4);
		
		textField_2 = new JTextField();
		textField_2.setBounds(220, 49, 66, 21);
		panel.add(textField_2);
		textField_2.setColumns(10);
		
		JLabel label_5 = new JLabel("仓库：");
		label_5.setBounds(310, 52, 54, 15);
		panel.add(label_5);
		
		textField_3 = new JTextField();
		textField_3.setBounds(357, 49, 66, 21);
		panel.add(textField_3);
		textField_3.setColumns(10);
		
		JLabel lblNewLabel = new JLabel("操作员：");
		lblNewLabel.setBounds(25, 75, 54, 15);
		panel.add(lblNewLabel);
		
		textField_4 = new JTextField();
		textField_4.setBounds(75, 72, 66, 21);
		panel.add(textField_4);
		textField_4.setColumns(10);
		
		JLabel label_6 = new JLabel("备注：");
		label_6.setBounds(170, 77, 54, 15);
		panel.add(label_6);
		
		textField_5 = new JTextField();
		textField_5.setBounds(220, 72, 66, 21);
		panel.add(textField_5);
		textField_5.setColumns(10);
		
		JLabel label_7 = new JLabel("总额合计：");
		label_7.setBounds(296, 77, 65, 15);
		panel.add(label_7);
		
		textField_6 = new JTextField();
		textField_6.setBounds(357, 72, 66, 21);
		panel.add(textField_6);
		textField_6.setColumns(10);
		
		JLabel label_8 = new JLabel("销售商品列表");
		label_8.setBounds(10, 120, 85, 15);
		panel.add(label_8);
		
		JLabel label_9 = new JLabel("赠品列表");
		label_9.setBounds(10, 270, 54, 15);
		panel.add(label_9);
		
		JScrollPane scrollPane = new JScrollPane();
		scrollPane.setBounds(25, 141, 563, 119);
		panel.add(scrollPane);
		
		table = new JTable(10,12);
		table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
		scrollPane.setViewportView(table);
		
		JScrollPane scrollPane_1 = new JScrollPane();
		scrollPane_1.setHorizontalScrollBarPolicy(ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);
		scrollPane_1.setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS);
		scrollPane_1.setBounds(24, 295, 564, 77);
		panel.add(scrollPane_1);
		
		table_1 = new JTable(5,12);
		table_1.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
		scrollPane_1.setViewportView(table_1);
		
		JButton button = new JButton("添加商品");
		button.setBounds(392, 112, 93, 23);
		panel.add(button);
		
		JButton button_1 = new JButton("删除商品");
		button_1.setBounds(495, 112, 93, 23);
		panel.add(button_1);
		
		JButton button_2 = new JButton("添加客户");
		button_2.setBounds(10, 94, 93, 23);
		panel.add(button_2);
		
		JButton button_3 = new JButton("删除客户");
		button_3.setBounds(112, 94, 93, 23);
		panel.add(button_3);
		
		JButton button_4 = new JButton("退出系统");
		button_4.setBounds(446, 14, 93, 23);
		frame.getContentPane().add(button_4);
		
		JButton button_5 = new JButton("软件帮助");
		button_5.setBounds(320, 14, 93, 23);
		frame.getContentPane().add(button_5);
		
		JLabel label_2 = new JLabel("当前用户");
		label_2.setBounds(646, 4, 54, 15);
		frame.getContentPane().add(label_2);
		
		JButton button_6 = new JButton("注销");
		button_6.setBounds(701, 0, 64, 19);
		frame.getContentPane().add(button_6);
		
		JButton button_7 = new JButton("客户管理");
		button_7.setBounds(21, 85, 105, 33);
		frame.getContentPane().add(button_7);
		
		JButton button_8 = new JButton("销售管理");
		button_8.setBounds(21, 142, 105, 33);
		frame.getContentPane().add(button_8);
		
		JButton button_9 = new JButton("销售退货管理");
		button_9.setBounds(21, 199, 105, 33);
		frame.getContentPane().add(button_9);
		
		JButton button_10 = new JButton("进货管理");
		button_10.setBounds(21, 255, 105, 33);
		frame.getContentPane().add(button_10);
		
		JButton button_11 = new JButton("进货退货管理");
		button_11.setBounds(21, 314, 105, 33);
		frame.getContentPane().add(button_11);
		
		JButton button_12 = new JButton("返回主界面");
		button_12.setBounds(21, 374, 105, 33);
		frame.getContentPane().add(button_12);
	}
}
